﻿Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Mvc
Imports System.Web.Routing

Public Module RouteConfig
    Public Sub RegisterRoutes(ByVal routes As RouteCollection)
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}")

        routes.MapRoute(
           name:="RandomPage",
           url:="special/random",
           defaults:=New With {.controller = "Wiki", .action = "RandomPage"}
       )
        routes.MapRoute(
            name:="Special",
            url:="special/{page}",
            defaults:=New With {.controller = "Wiki", .action = "SpecialPage"}
        )
        routes.MapRoute(
            name:="SpecialIndex",
            url:="special",
            defaults:=New With {.controller = "Wiki", .action = "SpecialPage", .page = "Index"}
        )

        routes.MapRoute(
            name:="Default",
            url:="{action}",
            defaults:=New With {.controller = "Wiki"}
        )

        routes.MapRoute(
            name:="Home",
            url:="",
            defaults:=New With {.controller = "Wiki", .action = "FetchExact", .page = "Index"}
        )


    End Sub
End Module